package com.yunzheng.dto;

import com.yunzheng.constants.SystemConstants;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author Sun
 * @date 2020-08-01 16:31
 */
@Data
public class LoginDTO {

	@Pattern(regexp = SystemConstants.PHONE_REGEX, message = "无效的手机号")
	private String userPhone;

	@NotBlank(message = "密码不能为空")
	@Length(min = 6, max = 16, message = "密码长度不符合标准（6~16位）")
	private String password;
}
